
/*code data for asian participants*/

/*code and drop non-asians*/

gen asian=0
recode asian(0=1) if Q1==1
tab asian

drop if asian==0

/*treatments*/

gen foreigner=0
recode foreigner(0=1) if m1==2

tab foreigner

/*pre-treatment covariates*/

gen chinese=0
recode chinese(0=1) if Q3==8
tab chinese

gen age=(Q10+17)
summ age

gen female=0
recode female(0=1) if Q11==1
tab female

gen usborn=0
recode usborn(0=1) if Q12==1
tab usborn 

gen liberal=(Q13-1)/6
summ liberal

summ chinese age female usborn liberal if foreigner==1

tab chinese foreigner, chi2
tab usborn foreigner, chi2
ttest age, by(foreigner)
tab female foreigner, chi2
ttest liberal, by(foreigner)

reg foreigner chinese age female usborn liberal
test chinese age female usborn liberal

probit foreigner chinese age female usborn liberal
test chinese age female usborn liberal






